package com.example.hms.controller;
import com.example.hms.entity.Room;
import com.example.hms.service.RoomService;
import com.example.hms.ulit.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController()
@RequestMapping("/room")
public class RoomController {
    @Resource
    private RoomService service;
    @RequestMapping(value = "/selectAll", method = RequestMethod.GET)
    public Result selectAll(String roomNumber, String roomTypeName, String roomId)
    {return service.selectAll(roomNumber,roomTypeName,roomId);}
    @RequestMapping(value = "/insert", method = RequestMethod.GET)
    public Result insert(Room room){return service.insert(room);}
    @RequestMapping(value = "/update", method =RequestMethod.GET)
    public Result update(Room room){return service.update(room);}
    @RequestMapping(value = "/delete", method = RequestMethod.GET)
    public Result delete(Room room) {return service.delete(room);

}
}
